package com.eypg.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.eypg.pojo.Producttype;
import com.eypg.service.ProductTypeService;
import com.eypg.util.Struts2Utils;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author 作者ryan_song E-mail:song316@gmai.com
 * @version 创建时间：2011-3-3 下午10:12:32
 * 类说明
 */
@Component
public class ProductTypetAction extends ActionSupport{
	private static final long serialVersionUID = -6356307819518359036L;
	
	@Autowired
	private ProductTypeService productservice;
	
//	public String loadAllProductType(){
//		List<Producttype> list = productservice.queryAllProductType();
//		StringBuilder sb = new StringBuilder("[");
//		if(list != null && list.size() > 0){
//			for (Producttype producttype : list) {
//				sb.append("{\"");
//				sb.append(producttype.getTypeId());
//				sb.append("\":\"" + producttype.getTypeName());
//				sb.append("\"},");
//			}
//			sb.setLength(sb.length()-1);
//		}
//		sb.append("]");
//		Struts2Utils.renderText(sb.toString());
//		return null;
//	}
	
	//setter & getter
}
